package com.pocket.cloud.common.client;

import com.pocket.cloud.common.api.ResultData;
import com.pocket.cloud.common.api.ReturnCodeEnum;
import com.pocket.cloud.common.dto.OrderSettlementDTO;
import org.springframework.stereotype.Component;

/**
 * @author zhaozhile
 */
@Component
public class PaymentClientFallBack implements PaymentClient{

    // 【cloud-openfeign-1.3】 如果引入 Sentinel 服务降级，则无须再使用此降级策略
    @Override
    public ResultData<OrderSettlementDTO> getPayByOrderNo(String orderNo) {
        return ResultData.fail(ReturnCodeEnum.RC500, "上游服务异常，触发Payment服务FallBack降级!");
    }
}
